import axios from 'axios'
import qs from 'qs'
export default {
    post(url,data){
        return new Promise((resolve, reject) => {
            axios.post(url,qs.stringify(data)).then((res) => {
                    let code = res.data.code;
                    let data = res.data.data;
                    if(code==200){
                        resolve(data);
                    }else{
                        this.$Message.error(res.msg);
                        reject(data.msg);
                    }
                }).catch(function (error) {
                    this.$Message.error(error);
                    reject(error);
                });
        });
    },get(){

    }
}
